package org.grottarossa.template.data.pojo.workflows;

import java.util.ArrayList;

public abstract class Activity 
{
	/***/
	String activityName;
	/***/
	String activityLayout;
	/***/
	String caseFolderField;
	protected ArrayList<Dispatch> dispatchs;
		
	public String getCaseFolderField() {
		return caseFolderField;
	}

	public void setCaseFolderField(String caseFolderField) {
		this.caseFolderField = caseFolderField;
	}

	public Activity() 
	{	
		dispatchs = new ArrayList<Dispatch>();		
	}

	public String getActivityName() {
		return activityName;
	}

	public void setActivityName(String activityName) {
		this.activityName = activityName;
	}

	public String getActivityLayout() {
		return activityLayout;
	}

	public void setActivityLayout(String activityLayout) {
		this.activityLayout = activityLayout;
	}
	
	public ArrayList<Dispatch> getDispatchs() {
		return dispatchs;
	}
	
	public Dispatch getDispatch(String sCaption) 
	{		
		for ( Dispatch dispatch : dispatchs ) 
		{		
			if ( sCaption.equals(dispatch.getDisplay()))
			{
				return dispatch;
			}			
		}
		return null;
	}	
}
